package com.lingyue.entity.module.def.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author lizhiyuan
 * @since 2020-01-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("load_data_batch")
@ApiModel(value = "LoadDataBatchEntity对象", description = "")
public class LoadDataBatchEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String LDB_ID = "LDB_ID";

    @ApiModelProperty(value = "经销商ID")
    @TableField("LDB_DEL_ID")
    private Long delId;

    @ApiModelProperty(value = "客户标签/车辆标签/人车关系/自定义线索/未分配线索")
    @TableField("LDB_TYPE")
    private String type;

    @ApiModelProperty(value = "上传日期")
    @TableField("LDB_DATE")
    private LocalDateTime date;

    @TableField("LDB_NUMBER_ALL")
    private Long numberAll;

    @TableField("LDB_NUMBER_VALID")
    private Long numberValid;

    @TableField("LDB_NUMBER_INVALID")
    private Long numberInvalid;

    @ApiModelProperty(value = "处理状态")
    @TableField("LDB_STATUS")
    private String status;
    public static final String LDB_DEL_ID = "LDB_DEL_ID";
    public static final String LDB_TYPE = "LDB_TYPE";

    @ApiModelProperty(value = "创建人")
    @TableField("LDB_CREATE_USER")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    @TableField("LDB_CREATE_DATE")
    private LocalDateTime createDate;

    public static final String LDB_DATE = "LDB_DATE";
    public static final String LDB_NUMBER_ALL = "LDB_NUMBER_ALL";
    public static final String LDB_NUMBER_VALID = "LDB_NUMBER_VALID";
    public static final String LDB_NUMBER_INVALID = "LDB_NUMBER_INVALID";
    public static final String LDB_STATUS = "LDB_STATUS";
    public static final String LDB_UPLOAD_FILE_NAME = "LDB_UPLOAD_FILE_NAME";
    public static final String LDB_DOWNLOAD_FILE_NAME = "LDB_DOWNLOAD_FILE_NAME";
    public static final String LDB_CREATE_USER = "LDB_CREATE_USER";
    public static final String LDB_CREATE_DATE = "LDB_CREATE_DATE";

    @ApiModelProperty(value = "id")
    @TableId("LDB_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @TableField("LDB_ORIGINAL_FILE_NAME")
    private String originalFileName;

    @TableField("LDB_UPLOAD_FILE_NAME")
    private String uploadFileName;

    @TableField("LDB_DOWNLOAD_FILE_NAME")
    private String downloadFileName;

    @TableField(exist = false)
    private String uploadUrl;

    @TableField(exist = false)
    private String downloadUrl;

    @TableField(exist = false)
    private String result;

    public LoadDataBatchEntity() {
    }

    public static void set(LoadDataBatchEntity entity, Long numberAll, Long numberInvalid, Long numberValid, String status) {
        entity.numberAll = numberAll;
        entity.numberInvalid = numberInvalid;
        entity.numberValid = numberValid;
        entity.status = status;
    }
}
